package com.etoak.api;

import com.etoak.common.core.UserVo.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@FeignClient(name = "upload-service")
public interface UploadService {

    /**
     * 声明远程调用
     * @param image
     * @return
     * @throws IOException
     */
    @PostMapping(value = "/upload/image" , consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    ResultVO<Object> upload(@RequestPart MultipartFile image) throws IOException;
}
